<!-- 查看站内信 -->

<div class="modal fade" id="ajaxshowmessage" tabindex="-1" role="dialog" aria-labelledby="ajaxshowmessage">
  <div class="modal-dialog" role="document">
    <div class="modal-content">
        
        <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
        <h4 class="modal-title" id="myModalLabel">查看信息</h4>
        </div>
        
        
        <div class="modal-body">
            <div class="loadding"></div>
            <div class="messagecontent"></div>
        </div>
        
       <div class="modal-footer">
        <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
        <button type="button" id="messagereplay" class="btn btn-primary" data-toggle="modal" data-uid="<{$tenant["id"]}>" data-uname="<{$tenant["user_name"]}>" data-target="#sendmessage">回复</button>
      </div>
        
        
    </div>
  </div>
</div>
<script>
    $('#ajaxshowmessage').on('show.bs.modal', function (event) {
            var obj = $(event.relatedTarget);
            var id=obj.data("id");
            var type=obj.data("type");
            $("#messagereplay").hide();
            if(type=="showonly"){
                
            }else{
                $("#messagereplay").data("id",id);
                $("#messagereplay").show();
            }
            $(".loadding").show();
            $.post("<{echo Common::RewriteUrl("SendMessage","public_ajax_getmessage");}>",{"id":id},function(data){
                $(".loadding").hide();
                $(".messagecontent").html(data);
                if(type=="showonly"){
                   $(".onlyshowsend").show();
                }else{
                   $(".onlyshowsend").hide();
                   
                }
            });
            
    });
</script>